# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-console-menu
_pkgname=console-menu
pkgver=0.8.0
pkgrel=4
pkgdesc='A simple Python menu-based UI system for terminal applications.'
arch=('any')
url='https://pypi.org/project/console-menu/#files'
license=('MIT')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('3e2a937bd3c075af5406de451c92d853b53af42f4fb12fa7fe3003d06a1bd84df258091546fef194e997e8a38220a7ca5e67701f16b02fad6d63a6591584f4d1')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

